const {
  createObserver,
  createProxy,
  refreshEvent,
  list
} = require('./proxy_observer');

// --- --- TEST START --- --- //
function test1() {
  let pre_a = {};
  let a = createProxy('event1', pre_a);
  a.ss = 'ddd';
  refreshEvent('event1', 'test args');
}
function test2() {
  let pre_b = {};
  let b = createProxy('event1', pre_b);

  createObserver('event1')
  .then((args) => {
    console.log('>>> event1 function => ', args);
  })
  .catch((err) => {
    console.error(err.message);
  });
}
function test3() {
  list()
  refreshEvent('event1', 'test after');
}
test1();
test2();
test3();